package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class AccountDayStatDownloadAllBalanceVO {

    private BigDecimal user_recharge_income_sum;
    private BigDecimal user_recharge_income_cnt;

    private BigDecimal user_recharge_expenditure_sum;
    private BigDecimal user_recharge_expenditure_cnt;


    private BigDecimal income_from_cycling_refund_sum;
    private BigDecimal income_from_cycling_refund_cnt;

    private BigDecimal cycling_consumption_expenditure_sum;
    private BigDecimal cycling_consumption_expenditure_cnt;


    @Csv(name = "预存款收入金额")
    private BigDecimal balance_sum;
    @Csv(name = "预存款收入笔数")
    private BigDecimal balance_cnt;
    @Csv(name = "预存款支出金额")
    private BigDecimal balance_expend_sum;
    @Csv(name = "预存款支出笔数")
    private BigDecimal balance_expend_cnt;


    @Csv(name = "预存款正常收入金额")
    private BigDecimal user_recharge_income_normal_sum;
    @Csv(name = "预存款正常收入笔数")
    private BigDecimal user_recharge_income_normal_cnt;

    @Csv(name = "预存款正常支出金额")
    private BigDecimal user_recharge_expenditure_normal_sum;
    @Csv(name = "预存款正常支出笔数")
    private BigDecimal user_recharge_expenditure_normal_cnt;


    @Csv(name = "预存款手工收入金额")
    private BigDecimal manual_recharge_sum;
    @Csv(name = "预存款手工收入笔数")
    private BigDecimal manual_recharge_cnt;
    @Csv(name = "预存款手工支出金额")
    private BigDecimal manual_deduction_sum;
    @Csv(name = "预存款手工支出笔数")
    private BigDecimal manual_deduction_cnt;


    @Csv(name = "期初预存款")
    private BigDecimal opening_and_closing_balance_start;
    @Csv(name = "期末预存款")
    private BigDecimal opening_and_closing_balance_end;


    public BigDecimal getBalance_sum() {
        return (user_recharge_income_sum == null ? BigDecimal.ZERO : user_recharge_income_sum).add(manual_recharge_sum == null ? BigDecimal.ZERO : manual_recharge_sum)
                .add(income_from_cycling_refund_sum == null ? BigDecimal.ZERO : income_from_cycling_refund_sum);
    }

    public BigDecimal getBalance_cnt() {
        return (user_recharge_income_cnt == null ? BigDecimal.ZERO : user_recharge_income_cnt).add(manual_recharge_cnt == null ? BigDecimal.ZERO : manual_recharge_cnt)
                .add(income_from_cycling_refund_cnt == null ? BigDecimal.ZERO : income_from_cycling_refund_cnt);
    }

    public BigDecimal getBalance_expend_sum() {
        return (user_recharge_expenditure_sum == null ? BigDecimal.ZERO : user_recharge_expenditure_sum).add(manual_deduction_sum == null ? BigDecimal.ZERO : manual_deduction_sum)
                .add(cycling_consumption_expenditure_sum);
    }

    public BigDecimal getBalance_expend_cnt() {
        return (user_recharge_expenditure_cnt == null ? BigDecimal.ZERO : user_recharge_expenditure_cnt).add(manual_deduction_cnt == null ? BigDecimal.ZERO : manual_deduction_cnt)
                .add(cycling_consumption_expenditure_cnt == null ? BigDecimal.ZERO : cycling_consumption_expenditure_cnt);
    }


    public BigDecimal getUser_recharge_income_normal_cnt() {
        return (user_recharge_income_cnt == null ? BigDecimal.ZERO : user_recharge_income_cnt)
                .add(income_from_cycling_refund_cnt == null ? BigDecimal.ZERO : income_from_cycling_refund_cnt);
    }

    public BigDecimal getUser_recharge_expenditure_normal_sum() {
        return (user_recharge_expenditure_sum == null ? BigDecimal.ZERO : user_recharge_expenditure_sum)
                .add(cycling_consumption_expenditure_sum == null ? BigDecimal.ZERO : cycling_consumption_expenditure_sum);
    }

    public BigDecimal getUser_recharge_expenditure_normal_cnt() {
        return (user_recharge_expenditure_cnt == null ? BigDecimal.ZERO : user_recharge_expenditure_cnt)
                .add(cycling_consumption_expenditure_cnt == null ? BigDecimal.ZERO : cycling_consumption_expenditure_cnt);
    }
}
